@extends('layout.index')


@section('content')
<div class="mws-panel grid_8">
	<div class="mws-panel-header">
    	<span>用户添加</span>
    </div>
    <div class="mws-panel-body no-padding">
		
		<!-- @if(session('error'))
		<div class="mws-form-message error">
        	{{session('error')}}
        </div>
        @endif
 -->

        @if (count($errors) > 0)
		   <div class="mws-form-message error">
		        <ul>
		            @foreach ($errors->all() as $error)
		                <li>{{ $error }}</li>
		            @endforeach
		        </ul>
		    </div>
		@endif

    	<form action="/user/insert" method='post' class="mws-form">
    		<div class="mws-form-inline">
    			<div class="mws-form-row">
    				<label class="mws-form-label">用户名:</label>
    				<div class="mws-form-item">
    					<input type="text" name='username' placeholder="用户名" class="small">
    				</div>
    			</div>
                <div class="mws-form-row">
                    <label class="mws-form-label">邮箱:</label>
                    <div class="mws-form-item">
                        <input type="text" name='email' placeholder="请输入邮箱" class="small">
                    </div>
                </div> 
                <div class="mws-form-row">
                    <label class="mws-form-label">手机号:</label>
                    <div class="mws-form-item">
                        <input type="text" name='phone' placeholder="手机号(仅支持中国大陆)" class="small">
                    </div>
                </div>  
    			<div class="mws-form-row">
    				<label class="mws-form-label">密码:</label>
    				<div class="mws-form-item">
    					<input type="password" name='password' placeholder="密码(不少于6位)" class="small">
    				</div>
    			</div>  
    			<div class="mws-form-row">
    				<label class="mws-form-label">确认密码:</label>
    				<div class="mws-form-item">
    					<input type="password" name='repassword' placeholder="请再次输入密码" class="small">
    				</div>
    			</div>      			
    		</div>
    		<div class="mws-button-row">
    			{{ csrf_field() }}
    			<input type="submit" class="btn btn-danger" value="提交">
    			<input type="reset" class="btn " value="重置">
    		</div>
    	</form>
    </div>    	
</div>
@endsection